package com.xuecheng.manage_course.controller;

import com.xuecheng.api.course.CourseCategoryControllerApi;
import com.xuecheng.framework.domain.course.ext.CategoryNode;
import com.xuecheng.manage_course.service.CategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/course/category")
public class CourseCategoryController implements CourseCategoryControllerApi {
    @Resource
    private CategoryService categoryService;
    /**
     * 级联菜单
     * 返回Category的层级菜单结构
     *
     * @return 级联菜单增强类
     */
    @Override
    @GetMapping("/list")
    public CategoryNode findCategoryList() {
        return categoryService.findCategoryList();
    }
}
